#{extends 'CRUD/layout.html' /}
#{set title:messages.get('crud.blank.title', type.modelName) /}
#{set 'moreScripts'}
<script src="@{'/public/javascripts/xheditor-zh-cn.min.js'}" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
	$(function() {
		
		$("#object_content").xheditor({tools:'FontSize,Bold,Italic,FontColor,BackColor,|,Align,List,Outdent,Indent,Link,Unlink,|,Table,Source,Fullscreen',width:600,height:200});
	});
</script>
#{/set}

<div id="crudBlank" class="${type.name}">

    <h2 id="crudBlankTitle">&{'crud.blank.title', type.modelName}</h2>

    <div class="objectForm">
    #{form action:@create(), enctype:'multipart/form-data'}
        #{crud.form fields:['title','content']}
        	#{crud.custom 'title'}
				 #{crud.textField name:'title', value:(object?.title) /}
				  <span class="crudHelp">&{'crud.help.required'}</span>
			#{/crud.custom}
			#{crud.custom 'content'}
				 #{crud.longtextField name:'content', value:(object?.content) /}
				  <span class="crudHelp">&{'crud.help.required'}</span>
			#{/crud.custom}
        #{/crud.form}
        <p class="crudButtons">
            <input type="submit" name="_save" value="&{'crud.save', type.modelName}" />
            <input type="submit" name="_saveAndContinue" value="&{'crud.saveAndContinue', type.modelName}" />
            <input type="submit" name="_saveAndAddAnother" value="&{'crud.saveAndAddAnother', type.modelName}" />
        </p>
    #{/form}
    </div>

</div>